out:=server
srcs:=$(wildcard *.c)
objs:=$(patsubst %.c,%.o,$(srcs))
$(out):$(objs)
	gcc $^ -o $@
%.o:%.c
	gcc -c $< -o $@
.PHONY:clean print rebuild
clean:
	rm -rf $(objs)
print:
	@echo $(objs)
	#加@即不打印命令
rebuild:
	clean $(out)
